<?
	require_once 'functions.php';
	require_once 'data.php';
	$result = GetAll();
	$rootUrl = '/~N01425749/GarageSale/';

?>

<link rel="stylesheet" type="text/css" href="<?=$rootUrl?>inc/content.css" />

<div id="main_content">
	<? include("../inc/tabs.php"); ?>
	<h1>Users</h1>
    <a href="">Add</a>
    
		<table>
    		<tr>
            	<th>First Name </th>
                <th>Last Name </th>
            </tr>
            
    		<? while($rs = $result->fetch_assoc()) { ?>
            	<tr>
            		<td> <?=$rs['firstName']?> </td>
                    <td> <?=$rs['lastName']?> </td>
                    <td> 
                   		<a href="<?=$rootUrl?>/Users/edit.php?id=<?=$rs['id']?>">Edit</a>
                    	<a href="<?=$rootUrl?>/Users/delete.php?id=<?=$rs['id']?>">Delete</a>
                        <a href="<?=$rootUrl?>/Users/details.php?id=<?=$rs['id']?>">View</a>
                    </td>
                 </tr>   
      		<? } ?>   
              
 		</table>
</div>		

<? //$conn->close(); ?>